//For this example, set DataType to "int" in listarr.h
#include <iostream>
#include "list.h"
using namespace std;
void countBases(List &dnaSequence,int &aCount,int &cCount,int&tCount,int&gCount)
{
	dnaSequence.gotoBeginning();
	do
	switch(dnaSequence.getCursor()){
	case'A':
		aCount++;
		break;
	case'C':
		cCount++;
		break;
	case'G':
		gCount++;
		break;
	case'T':
		tCount++;
		break;
	default:
		break;
	}
	while(dnaSequence.gotoNext());
	cout<<"aCount="<<aCount<<endl;
	cout<<"cCount="<<cCount<<endl;
	cout<<"gCount="<<gCount<<endl;
	cout<<"tCount="<<tCount<<endl;
}
void main(){
	List samples(100);//Set of samples
	int x,//Input sample
	total=0;//Sum of the Input samples
	//Read in a set of samples from the keyboard.
	char c;
	bool run=true;
	//cout<<"Enter list of samples (end with eof):";
	while(cin>>c){
		samples.insert(c);
	}
	samples.showStructure();
	int at=0,ct=0,gt=0,tt=0;
	countBases(samples,at,ct,gt,tt);
	
	system("pause");
}